# This file is part of the Net::Tube module.
#
# Net::Tube is Free Software; you can use, redistribute it and/or
# modify it under the terms of either:
#
# a) the GNU General Public License as published by the Free Software
#    Foundation, either version 2, or (at your opinion) any later
#    version, or
#
# b) the "Artistic License" which comes with Perl.
#
package Net::Tube::Machine::Configured;

use Net::Tube;
use Net::Tube::ConfigLoader;

our @ISA = qw(Net::Tube::Machine);

sub load_pipeline {
    my $self = shift;
    my $fname= shift;
    
    my $cl = Net::Tube::ConfigLoader->new();
    my $tube = $cl->load_config_file($fname);
    if ( defined $tube && scalar @$tube ) {
        $self->set_pipeline(@$tube);
    } 
}

1;
